﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;


namespace WeiXinPF.Modules.Core.Admin.Application.Services
{
    public class VoteService : IVoteService
    {
        public Model.wx_vote_base GetDisplayVote(int wid)
        {
            BLL.wx_vote_base baseBll = new BLL.wx_vote_base();
            List<Model.wx_vote_base> mlist = baseBll.GetModelList(
                string.Format(" wid={0} and (endTime is null or endTime >= getdate()) order by creatDate desc", wid));
            if (mlist.Count <= 0 || mlist == null)
            {
                return null;
            }

            return mlist[0];

            return null;
        }
    }
}
